# weather_03_mcp_server.py
import asyncio

from weather_01_provider import WeatherDataProvider


class WeatherInfoServer:
    def __init__(self):
        self.weather_provider = WeatherDataProvider()

    async def get_city_weather(self, city: str):
        result = await self.weather_provider.get_weather(city)
        return result


async def main():
    user = WeatherInfoServer()
    city = "北京"
    weather_info = await user.get_city_weather(city)
    print(weather_info)


if __name__ == "__main__":
    asyncio.run(main())
